005 screens and navigation
欢迎回到这个。
Welcome back in this one.
让我们继续进行导航工作。
Let's go ahead and work on navigation.
因此,在我们的一些应用程序中,我想说我们的大多数应用程序都会有多个屏幕。
So in some of our applications I would say most of our applications we're going to have multiple screens.
因此,让我们继续走到左边,单击这个新的屏幕图标,我们将打开一个屏幕,然后再单击一次,就会出现屏幕三。
So let's go ahead and come over here to the left and click on this new screen icon and we'll take a screen to and click it one more time and have a screen three.
现在这三个屏幕看起来几乎一模一样。
And right now all three of these screens look pretty much exactly the same.
所以我们需要一些东西来区分其中一个和另一个。
So we're going to need something to distinguish one of these from the other.
因此,我将在此处拖动一些静态文本,并将此屏幕称为第一屏幕。
So I'm going to drag over here some static text and I'm going to call this screen one.
我只需要把它输入进去,然后我们就可以开始制作了。
I'm just going to type that in and let's go ahead and make that.
我会给它大约十六分的权利。
I'll give it about sixteen point right.
我不喜欢所有额外的边框和所有东西。
And I don't like it with all of that extra border and everything.
那么让我们获取对象属性。
So let's take object properties.
框架类型。
Frame type.
我不会说。
I'm going to say none.
我真的不喜欢背景颜色,所以我也将其设置为透明,然后单击“确定”。
And I really don't like having a background color so I'm just going to make that transparent as well and hit OK.
所以现在我刚刚得到了普通的旧文本,上面写着屏幕 1,我将继续将其移动到这个顶角,然后我将按下键盘上的 Control C 并看到一个小提琴让我复制它。
So now I've just got plain old text which says screen 1 and I'll go ahead and move that up into this top corner and I'm going to hit Control C on my keyboard and see a fiddle let me copy that.
好的。
Good.
我也可以在屏幕上点击 Control V。
I can hit Control V in screen too.
然后再次控制屏幕 3,我将更改此处的文本,以便成为屏幕 3。
And then control again and screen 3 and I'm just going to change the text here so that's going to be screen 3.
然后在屏幕 2 中,我还将更改文本以表示屏幕不是第三,而是完美。
And then in screen 2 I'm going to change the text as well to say screen not three but to perfect.
所以现在我实际上拥有三个屏幕,并且我可以区分其中一个。
So now I actually have three screens and I can tell one from the other.
那么,每当我运行我的应用程序时,如何在这些屏幕之间移动。
So how do I move between these screens whenever I'm running my app.
因此,如果我单击“模拟”并启动它,您就会看到这里。
So if I click on simulate and I start it you see right here.
伟大的。
Great.
我的应用程序就在我面前,我可以看到我在屏幕一上,但实际上没有什么可点击的,也没有办法到达屏幕或屏幕 3。
I've got my app in front of me and I can see that I'm on screen one but there's really nothing to click on and there's no way to get to a screen to or screen 3.
因此,让我们进入对象菜单中的此处和右侧,让我们向下滚动到这里和那里。
So let's go in here and on our right in our objects menu Let's scroll down here and there we go.
我们已经控制了屏幕更改按钮屏幕更改选择器和弹出窗口框架。
We've got under control screen change push button screen change selector and pop up window frame.
好吧,让我们从简单的开始吧。
Well let's start with the easy one.
我只需将屏幕更改按钮拖到此处,并且大部分参数将保持原样。
I'm just going to drag over here a screen change push button and I'm going to leave most of the parameters exactly the way that they are.
对于文本,我将在这里输入两个,这将使我在此处转到下面的两个。
And for the text I'm just going to put in a two here and that's going to bring me two down here under go to.
我可以让它带我进入开机屏幕 我可以前进一个屏幕 我可以转到上一个屏幕,或者在这种情况下,我将实际获取一个数字,所以我将转到第二个屏幕并点击。
I can have it bring me to a power up screen I can move forward a screen I can go to the previous screen or in this case I'm going to actually take a number so I'm going to go to screen number two and hit.
好的。
OK.
现在我要快速点击“模拟”,这是这个应用程序的优点。
And now I'm just going to hit simulate real quick which is something nice about this app.
当您想测试某些东西时,速度非常快。
When you want to test something it's really quick to do it.
我们只需点击它,看看它是否也会将您带到您的屏幕。
And let's just click on this and see if it takes you to your screen too.
答对了。
Bingo.
所以现在我实际上也有办法进入屏幕了。
So now I actually have a way to get to screen too.
我无法进入屏幕 3,甚至无法返回屏幕 1,但没关系,我们正在取得正确的进展。
I can't get the screen three and I can't even get back to screen 1 but that's OK we're making progress right.
那么让我们尝试另一个工具。
So let's try another tool.
让我们尝试一下摆动屏幕选择器,将其拖到此处然后放开。
Let's try this screen selector swung going to drag that over here and let it go.
让我们看看这个东西到底是如何工作的。
Let's see how this thing works exactly.
我将为自己提供三列,因为我们没有五个屏幕,我将保留标签和所有内容原样,对于屏幕,我们有可用的屏幕按钮与当前的屏幕按钮,所以看起来我们已经使用我们的所有三个屏幕按钮进行设置。
I'm going to give ourselves three columns because we don't have five screens and I will leave the labels and everything exactly the way they are and for screens we have available screen buttons versus current screen button so it looks like we're already set up with all three of our screen buttons.
我们有一个可见性选项,可以让这个东西消失,但我们稍后会在另一场讲座中讨论它。
We have a visibility option that we can make this thing disappear but we'll look at that a little bit later on in another lecture.
所以让我们继续,点击“确定”,让我们复制这个,我将进入屏幕 2,我将粘贴它,我将进入屏幕 3,再次粘贴,然后我将点击模拟并快速启动。
So let's go ahead and hit OK and let's just copy this and I'm going to come into screen 2 and I'm going to paste it and I'm going to come in to screen 3 and pasted again and then I'm going to hit simulate and start just that quickly.
那么让我们看看这个东西是否按照我们想象的方式工作。
So let's see if this thing works the way we think it does.
当我单击查看时,我在屏幕 2 上,然后单击屏幕 3 上的 3。
When I click on to look at that I'm on screen 2 and I click on three on screen three.
当我再次单击一个时,我回到屏幕 1。
When I click one again I'm back on screen 1.
哇。
Wow.
所以我会针对 Seymours 软件这么说。
So I will say this for Seymours software.
它们使屏幕导航变得非常非常简单。
They make screen navigation very very very simple.
您可以看到,每当我们在零件列表中创建小屏幕选择器时,都会有一些不同的小格式,我们可以有一种网格,也可以有一个垂直工具,也可以有一个水平工具,每当我们打开它时我们还可以更改文本。
And you can see whenever we created our little screen selector down here on our parts list there are some different little formats for that we can have kind of a grid or we can have a vertical or we can have a horizontal tool and whenever we open this up we can also change the text.
因此,如果我们现在查看按钮文本,我们显示的文本是屏幕编号,但我们也可以显示屏幕名称或屏幕编号和名称。
So if we look at this where it says button text right now the text that we're showing is the screen number but we could also show the screen name or the screen number and name.
假设我们想要屏幕名称,并且希望将其更改为垂直选择器。
So let's say we wanted the screen name and we wanted to change this to a vertical selector.
好吧,当我们点击“确定”时,这个东西突然变得很小了。
Well when we hit OK on that this thing got pretty small all of a sudden.
所以让我们把它弄大一点。
So let's make it larger.
实际上我们不想要五行,由于某种原因我们有五行。
And actually we don't want five for some reason we got five rows.
因此,让我们继续将其减少到三个。
So let's go ahead and drop that down to three.
现在看起来不错。
Now that looks pretty good.
如果我们希望这些屏幕具有不同的名称,我们当然可以直接过来并重命名屏幕。
And if we wanted these screens to have different names of course we can come right over here and rename the screen.
因此,我们可以将此称为设定点,而不是第二个屏幕,因为这听起来像是我们肯定会在 HMO 中用作屏幕的东西。
So instead of screen two we could call this setpoints because that sounds like something that we would surely use as a screen within an HMO.
现在,当我们更改此设置时,您可以看到该按钮显示设定点,而不是一、二、三或屏幕一或屏幕二。
And when we change that now you can see this button says setpoints instead of one or two or three or screen one or screen two.
这就是您如何使用其中一些工具在屏幕之间来回切换的方式,因为您永远不想创建一个无法进入或无法退出的屏幕。
So that's how you can use some of these tools to get back and forth between your screens because you never want to create a screen that you can't get to or you can't get out of.
这一点都不酷。
That's not cool at all.
所以这只是基础知识,并不是您了解有关导航的所有知识。
So that's just the basics that's not you know everything there is to know about navigation.
您可以自己探索其余部分,但这就是创建项目所需了解的内容。
You can explore the rest of it on your own but that's what you're going to need to know to get a project created.
这些是您 90% 的时间都会使用的工具。
These are the tools you're going to use 90 percent of the time.
这就是本次讲座的内容。
So that's it for this lecture.
下次见。
See you next time.
干杯
Cheers